
*	************************************************************************
* 	File-Name: 		CTEP_2014_IndiaCDM_replication.do
*	Date:  			18 March 2014
*	Authors: 		Patrick Bayer, Johannes Urpelainen, and Alice Xu
*	Journal:		Clean Technologies and Environmental Policy
* 	Paper:			Laissez Faire and the Clean Development Mechanims: 
*					Determinants of Project Implementation in Indian States, 2003-2011
*
*	Data Used:  	IndiaCDM.dta	
*	Purpose:   		.do file for replication
*	Software:		Stata IC 12.1
*	Machine:		WINDOWS 7
*
*	************************************************************************

clear all

* NB: Please place .do file and data in the same folder
use "./IndiaCDM.dta"
set more off, permanently


*	************************************************************************
*	(I) MAIN TEXT
*	************************************************************************

*	************************************************************************
*	1. Summary statistics (Table 2)
*	************************************************************************

eststo clear
xi: xtnbreg projectcount renewables nonrenew lnpriv_total lnpublic_total ipollnfixed_capital election lnipolpop lngdppc growth debt i.year i.zonalcouncil, re 
estpost summarize projectcount renewables nonrenew lnpriv_total lnpublic_total ipollnfixed_capital election lnipolpop lngdppc growth debt if e(sample)

*	************************************************************************
*	2. Correlation matrix (Table 3)
*	************************************************************************

eststo clear 
xi: xtnbreg projectcount renewables nonrenew lnpriv_total lnpublic_total ipollnfixed_capital election lnipolpop lngdppc growth debt i.year i.zonalcouncil, re 
estpost correlate projectcount renewables nonrenew lnpriv_total lnpublic_total ipollnfixed_capital election lnipolpop lngdppc growth debt if e(sample), matrix

*	************************************************************************
*	3. Main results (Tables 4-6)
*	************************************************************************

* Estimation results for all CDM projects (Table 4)
eststo clear
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election  i.year i.zonalcouncil, re
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election lnipolpop i.year i.zonalcouncil, re
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election lnipolpop lngdppc i.year i.zonalcouncil, re
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election lnipolpop lngdppc growth i.year i.zonalcouncil, re
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election lnipolpop lngdppc growth debt i.year i.zonalcouncil, re

* Estimation results for renewable CDM projects (Table 5)
eststo clear
eststo: xi: xtnbreg renewables lnpriv_total lnpublic_total ipollnfixed_capital election i.year i.zonalcouncil, re
eststo: xi: xtnbreg renewables lnpriv_total lnpublic_total ipollnfixed_capital election lnipolpop i.year i.zonalcouncil, re
eststo: xi: xtnbreg renewables lnpriv_total lnpublic_total ipollnfixed_capital election lnipolpop lngdppc i.year i.zonalcouncil, re
eststo: xi: xtnbreg renewables lnpriv_total lnpublic_total ipollnfixed_capital election lnipolpop lngdppc growth i.year i.zonalcouncil, re
eststo: xi: xtnbreg renewables lnpriv_total lnpublic_total ipollnfixed_capital election lnipolpop lngdppc growth debt i.year i.zonalcouncil, re

* Estimation results for non-renewable CDM projects (Table 6)
eststo clear
eststo: xi: xtnbreg nonrenew lnpriv_total lnpublic_total ipollnfixed_capital election i.year i.zonalcouncil, re
eststo: xi: xtnbreg nonrenew lnpriv_total lnpublic_total ipollnfixed_capital election lnipolpop i.year i.zonalcouncil, re
eststo: xi: xtnbreg nonrenew lnpriv_total lnpublic_total ipollnfixed_capital election lnipolpop lngdppc i.year i.zonalcouncil, re
eststo: xi: xtnbreg nonrenew lnpriv_total lnpublic_total ipollnfixed_capital election lnipolpop lngdppc growth i.year i.zonalcouncil, re
eststo: xi: xtnbreg nonrenew lnpriv_total lnpublic_total ipollnfixed_capital election lnipolpop lngdppc growth debt i.year i.zonalcouncil, re


*	************************************************************************
*	(II) APPENDIX
*	************************************************************************

*	************************************************************************
*	A3 -- Robustness: Different control variables (Table A1)
*	************************************************************************

eststo clear
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total election ipollnfixed_capital ipoltransloss lnicorrupttotal i.year i.zonalcouncil, re
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total election ipollnfixed_capital ipoltransloss TIcorrupt i.year i.zonalcouncil, re
eststo: xi: xtnbreg renewables lnpriv_total lnpublic_total election ipollnfixed_capital ipoltransloss lnicorrupttotal i.year i.zonalcouncil, re
eststo: xi: xtnbreg renewables lnpriv_total lnpublic_total election ipollnfixed_capital ipoltransloss TIcorrupt i.year i.zonalcouncil, re
eststo: xi: xtnbreg nonrenew lnpriv_total lnpublic_total election ipollnfixed_capital ipoltransloss lnicorrupttotal i.year i.zonalcouncil, re
eststo: xi: xtnbreg nonrenew lnpriv_total lnpublic_total election ipollnfixed_capital ipoltransloss TIcorrupt i.year i.zonalcouncil, re


*	************************************************************************
*	A4 -- Robustness: Accounting for winning margin (Table A2)
*	************************************************************************

gen election2 = election
replace election2 = 0 if widemargin==1
label variable election2 "Election year"

eststo clear
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election2  i.year i.zonalcouncil, re
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election2 lnipolpop i.year i.zonalcouncil, re
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election2 lnipolpop lngdppc i.year i.zonalcouncil, re
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election2 lnipolpop lngdppc growth i.year i.zonalcouncil, re
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election2 lnipolpop lngdppc growth debt i.year i.zonalcouncil, re

*	************************************************************************
*	A5 -- Robustness: Controlling for partisanship (Table A3)
*	************************************************************************

eststo clear
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election partisan  i.year i.zonalcouncil, re
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election partisan lnipolpop i.year i.zonalcouncil, re
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election partisan lnipolpop lngdppc i.year i.zonalcouncil, re
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election partisan lnipolpop lngdppc growth i.year i.zonalcouncil, re
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election partisan lnipolpop lngdppc growth debt i.year i.zonalcouncil, re

*	************************************************************************
*	A6 -- Robustness: Controlling for pre- and post-election effects (Tables A4+A5)
*	************************************************************************

* Pre-election control
sort province year
by province: gen preelect = election[_n+1]
replace preelect = 0 if (preelect==. & election==1)
replace preelect = 0 if (preelect==. & election==0)
label variable preelect "Pre-election year"

eststo clear
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election preelect i.year i.zonalcouncil, re
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election preelect lnipolpop i.year i.zonalcouncil, re
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election preelect lnipolpop lngdppc i.year i.zonalcouncil, re
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election preelect lnipolpop lngdppc growth i.year i.zonalcouncil, re
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election preelect lnipolpop lngdppc growth debt i.year i.zonalcouncil, re


* Post-election control
by province: gen postelect = election[_n-1]
replace postelect = 0 if (postelect==. & election==1)
replace postelect = 0 if (postelect==. & election==0)
label variable postelect "Post-election year"

eststo clear
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election postelect i.year i.zonalcouncil, re
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election postelect lnipolpop i.year i.zonalcouncil, re
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election postelect lnipolpop lngdppc i.year i.zonalcouncil, re
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election postelect lnipolpop lngdppc growth i.year i.zonalcouncil, re
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election postelect lnipolpop lngdppc growth debt i.year i.zonalcouncil, re

*	************************************************************************
*	A7 -- Robustness: First difference of fixed capital (Table A6)
*	************************************************************************

xtset provinceid year
gen L1fixedcapital = L1.ipollnfixed_capital

gen fdfixedcapital = ipollnfixed_capital - L1fixedcapital
label variable fdfixedcapital "Fixed capital (first diff)"

eststo clear
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital fdfixedcapital election i.year i.zonalcouncil, re
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital fdfixedcapital election lnipolpop i.year i.zonalcouncil, re
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital fdfixedcapital election lnipolpop lngdppc i.year i.zonalcouncil, re
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital fdfixedcapital election lnipolpop lngdppc growth i.year i.zonalcouncil, re
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital fdfixedcapital election lnipolpop lngdppc growth debt i.year i.zonalcouncil, re

*	************************************************************************
*	A8 -- Robustness: Spatial diffusion (Table A7)
*	************************************************************************

eststo clear
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election contiguity i.year i.zonalcouncil, re
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election contiguity lnipolpop i.year i.zonalcouncil, re
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election contiguity lnipolpop lngdppc i.year i.zonalcouncil, re
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election contiguity lnipolpop lngdppc growth i.year i.zonalcouncil, re
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election contiguity lnipolpop lngdppc growth debt i.year i.zonalcouncil, re


*	************************************************************************
*	A9 -- Robustness: Models with state fixed effects (Table A8)
*	************************************************************************

eststo clear
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election i.year i.provinceid, re
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election lnipolpop i.year i.provinceid, re
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election lnipolpop lngdppc i.year i.provinceid, re
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election lnipolpop lngdppc growth i.year i.provinceid, re

*	************************************************************************
*	A10 -- Robustness: Controlling for renewable energy potential (Tables A9-A11)
*	************************************************************************

* Estimation results for all CDM projects (Table A9)
eststo clear
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election CDMpromotion i.year i.zonalcouncil, re
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election CDMpromotion lnipolpop i.year i.zonalcouncil, re
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election CDMpromotion lnipolpop lngdppc i.year i.zonalcouncil, re
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election CDMpromotion lnipolpop lngdppc growth i.year i.zonalcouncil, re
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election CDMpromotion lnipolpop lngdppc growth debt i.year i.zonalcouncil, re


* Estimation results for renewable CDM projects (Table A10)
eststo clear
eststo: xi: xtnbreg renewables lnpriv_total lnpublic_total ipollnfixed_capital election CDMpromotion i.year i.zonalcouncil, re
eststo: xi: xtnbreg renewables lnpriv_total lnpublic_total ipollnfixed_capital election CDMpromotion lnipolpop i.year i.zonalcouncil, re
eststo: xi: xtnbreg renewables lnpriv_total lnpublic_total ipollnfixed_capital election CDMpromotion lnipolpop lngdppc i.year i.zonalcouncil, re
eststo: xi: xtnbreg renewables lnpriv_total lnpublic_total ipollnfixed_capital election CDMpromotion lnipolpop lngdppc growth i.year i.zonalcouncil, re
eststo: xi: xtnbreg renewables lnpriv_total lnpublic_total ipollnfixed_capital election CDMpromotion lnipolpop lngdppc growth debt i.year i.zonalcouncil, re


* Estimation results for non-renewable CDM projects (Table A11)
eststo clear
eststo: xi: xtnbreg nonrenew lnpriv_total lnpublic_total ipollnfixed_capital election CDMpromotion i.year i.zonalcouncil, re
eststo: xi: xtnbreg nonrenew lnpriv_total lnpublic_total ipollnfixed_capital election CDMpromotion lnipolpop i.year i.zonalcouncil, re
eststo: xi: xtnbreg nonrenew lnpriv_total lnpublic_total ipollnfixed_capital election CDMpromotion lnipolpop lngdppc i.year i.zonalcouncil, re
eststo: xi: xtnbreg nonrenew lnpriv_total lnpublic_total ipollnfixed_capital election CDMpromotion lnipolpop lngdppc growth i.year i.zonalcouncil, re
eststo: xi: xtnbreg nonrenew lnpriv_total lnpublic_total ipollnfixed_capital election CDMpromotion lnipolpop lngdppc growth debt i.year i.zonalcouncil, re


*	************************************************************************
*	A11 -- Robustness: Controlling for CDM promtion policies (Tables A12-A14)
*	************************************************************************

* Estimation results for all CDM projects (Table A12)
eststo clear
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election CDMpromotion i.year i.zonalcouncil, re
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election CDMpromotion lnipolpop i.year i.zonalcouncil, re
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election CDMpromotion lnipolpop lngdppc i.year i.zonalcouncil, re
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election CDMpromotion lnipolpop lngdppc growth i.year i.zonalcouncil, re
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election CDMpromotion lnipolpop lngdppc growth debt i.year i.zonalcouncil, re


* Estimation results for renewable CDM projects (Table A13)
eststo clear
eststo: xi: xtnbreg renewables lnpriv_total lnpublic_total ipollnfixed_capital election CDMpromotion i.year i.zonalcouncil, re
eststo: xi: xtnbreg renewables lnpriv_total lnpublic_total ipollnfixed_capital election CDMpromotion lnipolpop i.year i.zonalcouncil, re
eststo: xi: xtnbreg renewables lnpriv_total lnpublic_total ipollnfixed_capital election CDMpromotion lnipolpop lngdppc i.year i.zonalcouncil, re
eststo: xi: xtnbreg renewables lnpriv_total lnpublic_total ipollnfixed_capital election CDMpromotion lnipolpop lngdppc growth i.year i.zonalcouncil, re
eststo: xi: xtnbreg renewables lnpriv_total lnpublic_total ipollnfixed_capital election CDMpromotion lnipolpop lngdppc growth debt i.year i.zonalcouncil, re


* Estimation results for non-renewable CDM projects (Table A14)
eststo clear
eststo: xi: xtnbreg nonrenew lnpriv_total lnpublic_total ipollnfixed_capital election CDMpromotion i.year i.zonalcouncil, re
eststo: xi: xtnbreg nonrenew lnpriv_total lnpublic_total ipollnfixed_capital election CDMpromotion lnipolpop i.year i.zonalcouncil, re
eststo: xi: xtnbreg nonrenew lnpriv_total lnpublic_total ipollnfixed_capital election CDMpromotion lnipolpop lngdppc i.year i.zonalcouncil, re
eststo: xi: xtnbreg nonrenew lnpriv_total lnpublic_total ipollnfixed_capital election CDMpromotion lnipolpop lngdppc growth i.year i.zonalcouncil, re
eststo: xi: xtnbreg nonrenew lnpriv_total lnpublic_total ipollnfixed_capital election CDMpromotion lnipolpop lngdppc growth debt i.year i.zonalcouncil, re


*	************************************************************************
*	A12 -- Robustness: Models without 2011 projects (Tables A15-A17)
*	************************************************************************

* Estimation results for all CDM projects (Table A15)
eststo clear
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election i.year i.zonalcouncil if year < 2011, re
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election lnipolpop i.year i.zonalcouncil if year < 2011, re
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election lnipolpop lngdppc i.year i.zonalcouncil if year < 2011, re
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election lnipolpop lngdppc growth i.year i.zonalcouncil if year < 2011, re
eststo: xi: xtnbreg projectcount lnpriv_total lnpublic_total ipollnfixed_capital election lnipolpop lngdppc growth debt i.year i.zonalcouncil if year < 2011, re

* Estimation results for renewable CDM projects (Table A16)
eststo clear
eststo: xi: xtnbreg renewables lnpriv_total lnpublic_total ipollnfixed_capital election i.year i.zonalcouncil if year < 2011, re
eststo: xi: xtnbreg renewables lnpriv_total lnpublic_total ipollnfixed_capital election lnipolpop i.year i.zonalcouncil if year < 2011, re
eststo: xi: xtnbreg renewables lnpriv_total lnpublic_total ipollnfixed_capital election lnipolpop lngdppc i.year i.zonalcouncil if year < 2011, re
eststo: xi: xtnbreg renewables lnpriv_total lnpublic_total ipollnfixed_capital election lnipolpop lngdppc growth i.year i.zonalcouncil if year < 2011, re
eststo: xi: xtnbreg renewables lnpriv_total lnpublic_total ipollnfixed_capital election lnipolpop lngdppc growth debt i.year i.zonalcouncil if year < 2011, re

* Estimation results for non-renewable CDM projects (Table A17)
eststo clear
eststo: xi: xtnbreg nonrenew lnpriv_total lnpublic_total ipollnfixed_capital election i.year i.zonalcouncil if year < 2011, re
eststo: xi: xtnbreg nonrenew lnpriv_total lnpublic_total ipollnfixed_capital election lnipolpop i.year i.zonalcouncil if year < 2011, re
eststo: xi: xtnbreg nonrenew lnpriv_total lnpublic_total ipollnfixed_capital election lnipolpop lngdppc i.year i.zonalcouncil if year < 2011, re
eststo: xi: xtnbreg nonrenew lnpriv_total lnpublic_total ipollnfixed_capital election lnipolpop lngdppc growth i.year i.zonalcouncil if year < 2011, re
eststo: xi: xtnbreg nonrenew lnpriv_total lnpublic_total ipollnfixed_capital election lnipolpop lngdppc growth debt i.year i.zonalcouncil if year < 2011, re


